package com.cet.designpatterns.flyweight.cc;

import javax.swing.*;
import java.awt.*;

public class Test {
    public static void main(String[] args) {
        JFrame frame=new JFrame();
        mypanel panel=new mypanel();
        frame.setBounds(500,300,800,600);
        frame.add(panel);
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame.setVisible(true);
    }
    public static class mypanel extends JPanel {

        @Override
        public void paint(Graphics g){
            g.drawLine(100,200,0,0);
            // g.drawLine(100,200,300,400);
            g.drawRect(100,200,100,50);
            g.drawArc(100,200,100,50,90,180);

        }
    }
}
